﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStandardItemModel>
#include <QFileDialog>
#include <QMessageBox>
#include <QDebug>
#include <QAxObject>
#include <QFileInfo>
#include <QLabel>
#include <QTextStream>
#include <QtCharts/QtCharts>
#include <QBarSet>
#include <QVector>
#include <QScreen>
#include <QPixmap>
#include <QImage>


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

using namespace QtCharts;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_actOpenExcel_triggered();

    void on_actStaData_triggered();

    void on_actOpenTxt_triggered();

    void on_actLineChart_triggered();

    void on_actHistogram_triggered();

    void on_actPieChart_triggered();

    void on_actSave_triggered();

private:
    Ui::MainWindow *ui;

    void init();
    void staData();
    void updateLineChart();

    QStandardItemModel* m_dataModel;
    QAxObject* m_axObject;
    QStandardItemModel* m_staModel;
    QChart* m_chart;
    QChartView* m_chartView;

    QLabel m_labFilePath;
    QLabel m_labCurPosition;

};
#endif // MAINWINDOW_H
